import 'package:flutter/material.dart';
import 'wrap_demo.dart';
import 'flow_demo.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Flow Layout Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: const FlowLayoutHomePage(),
    );
  }
}

class FlowLayoutHomePage extends StatelessWidget {
  const FlowLayoutHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Flow Layout Demo'),
      ),
      body: SingleChildScrollView(
        child: Padding(
          padding: const EdgeInsets.all(16.0),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              const Text(
                'Wrap Widget Examples',
                style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
              ),
              const WrapDemo(),
              const SizedBox(height: 30),
              const Text(
                'Flow Widget Examples',
                style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
              ),
              const FlowDemo(),
            ],
          ),
        ),
      ),
    );
  }
}